//
//  XFOverlayView.m
//  FreeTime
//
//  Created by 王江华 on 16/8/26.
//  Copyright © 2016年 SRDZ.com. All rights reserved.
//

#import "XFOverlayView.h"

@implementation XFOverlayView

- (instancetype)init
{
    self = [super init];
    if (self) {
        _imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"left_cha"]];
        [self addSubview:_imageView];
    }
    return self;
}

-(void)setMode:(CGOverlayViewMode)mode
{
    if (_mode == mode) {
        return;
    }
    _mode = mode;
    if (mode == CGOverlayViewModeLeft) {
        _imageView.image = [UIImage imageNamed:@"left_cha"];
    }else{
        _imageView.image = [UIImage imageNamed:@"right_heart"];
    }
}

-(void)layoutSubviews
{
    [super layoutSubviews];
    _imageView.frame = self.bounds;
}

-(void)dealloc
{
    
    
    
}


@end
